Managing metadata for caching devices during shutdown and restart procedures

ABSTRACT

A computer program product, system, and method for managing metadata for caching devices during shutdown and restart procedures. Fragment metadata for each fragment of data from the storage server stored in the cache device is generated. The fragment metadata is written to at least one chunk of storage in the cache device in a metadata directory in the cache device. For each of the at least one chunk in the cache device to which the fragment metadata is written, chunk metadata is generated for the chunk and writing the generated chunk metadata to the metadata directory in the cache device. Header metadata having information on access of the storage server is written to the metadata directory in the cache device. The written header metadata, chunk metadata, and fragment metadata are used to validate the metadata directory and the fragment data in the cache device during a restart operation.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a computer program product, system, andmethod for managing metadata for caching devices during shutdown andrestart procedures.

2. Description of the Related Art

In distributed storage systems, one or more storage servers serve datato storage clients. The storage clients are equipped with local cachesthat use non-volatile memories to locally cache data for faster access.These memories are typically Flash, Phase Change Memory, etc. Thestorage server uses a coherency protocol to manage the coherence of thedata at different clients, ensuring that each client will have the mostup-to-date copy of data managed by the storage server for datamaintained in the client local cache so that no stale data will beserved to the user that accesses data through one of the clients.

In the event of a power cycle, the clients need to communicate with thestorage server to discover what data should be purged. purge data thatmay be invalid.

SUMMARY

A computer program product, system, and method for managing metadata forcaching devices during shutdown and restart procedures. Fragmentmetadata for each fragment of data from the storage server stored in thecache device is generated. The fragment metadata is written to at leastone chunk of storage in the cache device in a metadata directory in thecache device. For each of the at least one chunk in the cache device towhich the fragment metadata is written, chunk metadata is generated forthe chunk and writing the generated chunk metadata to the metadatadirectory in the cache device. Header metadata having information onaccess of the storage server is written to the metadata directory in thecache device. The written header metadata, chunk metadata, and fragmentmetadata are used to validate the metadata directory and the fragmentdata in the cache device during a restart operation.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an embodiment of a storage environment.

FIG. 2 illustrates an embodiment of a metadata directory.

FIG. 3 illustrates an embodiment of fragment metadata.

FIG. 4 illustrates an embodiment of header metadata.

FIGS. 5a and 5b illustrate an embodiment of operations to perform ashutdown of a caching client.

FIGS. 6a and 6b illustrate an embodiment of operations to perform arestart of a caching client.

FIG. 7 illustrates an embodiment of a computer architecture used withdescribed embodiments.

DETAILED DESCRIPTION

Described embodiments provide techniques for a caching client having oneor more non-volatile caching devices to generate metadata for fragmentdata stored in a non-volatile caching device during a shutdownoperation. The generated metadata is stored with the cached data in thecaching devices. During a restart operation, the metadata andpermissions are validated so that the metadata may be reused for thecached fragment data in a manner that minimizes coordination with thestorage server to regain permissions related to caching after therestart.

FIG. 1 illustrates a computing environment having one or more cachingclients 102 that cache data from a storage 104 managed by a storageserver 106 the caching clients 102 access over a network 108. Thecaching clients 102 may provide cached data from the storage server 104to applications and hosts on the same or different systems.

Each caching client 102 includes a processor 110, comprising one or morecentral processing units (CPUs) or cores, a main memory 112 and one ormore cache devices 114 ₁, 114 ₂ . . . 114 _(n) comprising non-volatilestorage to cache data form the storage server 104. The main memory 112includes a cache directory 116 having information on storage 106 datacached in the cache devices cache devices 114 ₁, 114 ₂ . . . 114 _(n)and a cache manager 118 to manage the cache devices cache devices 114 ₁,114 ₂ . . . 114 _(n). Each cache device 114 ₁, 114 ₂ . . . 114 _(n)includes a metadata directory 200 ₁, 200 ₂ . . . 200 _(n) havinginformation on the cache data 122 ₁, 122 ₂ . . . 122 _(n) stored in thecache devices 114 ₁, 114 ₂ . . . 114 _(n).

The network 108 may comprise a Storage Area Network (SAN), Wide AreaNetwork (WAN), Local Area Network (LAN), the Internet, and Intranet, awireless network, wired network, etc.

The storage 104 may comprise different types or classes of storagedevices, such as a solid state storage device (SSD) comprised of solidstate electronics, such as a EEPROM (Electrically Erasable ProgrammableRead-Only Memory), flash memory, Phase Change Memory, flash disk, RandomAccess Memory (RAM) drive, storage-class memory (SCM), etc., magneticstorage disk, optical disk, tape, etc. The storage may further beconfigured from an array of devices, such as Just a Bunch of Disks(JBOD),

Direct Access Storage Device (DASD), Redundant Array of IndependentDisks (RAID) array, virtualization device, etc. Further, the storage 120may comprise heterogeneous storage devices from different vendors.

The cache devices 114 ₁, 114 ₂ . . . 114 _(n) may comprise anon-volatile memory or storage device, such as a solid state storagedevice (SSD) comprised of solid state electronics, such as a EEPROM(Electrically Erasable Programmable Read-Only Memory), flash memory,Phase Change Memory, flash disk, etc.

The main memory 112 may comprise one or more volatile or non-volatilememory devices. The cache manager 118 may be implemented as a programcode loaded into the memory 112 and executed by the processor 110 or maybe implemented with hardware logic, such as an Application SpecificIntegrated Circuit (ASIC).

FIG. 2 illustrates an embodiment of a metadata directory 200, such asmetadata directories 200 ₁, 200 ₂ . . . 200 _(n), including headermetadata 400 having general information on the metadata directory 200 ₁,200 ₂ . . . 200 _(n), chunk metadata 204 on one or more chunks 206 ₁ . .. 206 _(n) in the metadata directory 200 to which one or more instancesof fragment metadata 208 ₁ . . . 208 _(n) are written, where eachinstance of fragment metadata is represented as an “FMD” block.

The variable “n” as used herein to represent a certain number ofinstances of an element, such as cache devices 114 _(n), metadatadirectory 200 _(n), cache data 122 _(n), etc., may indicate any integernumber of an element, and the variable number “n” when used to indicatea number for different elements may indicate the same or differentnumber of those elements.

FIG. 3 illustrates an embodiment of fragment metadata 300, such as theFMD blocks 208 ₁ . . . 208 _(n), where each instance of fragmentmetadata 300 may include a logical device identifier (ID) 302, such as aLogical Unit number (LUN) identifier, identifying a LUN or logicaldevice in the storage 104 from which the fragment originated; a fragmentidentifier (ID) 304 identifying the fragment in the cache data 122 ₁,122 ₂ . . . 122 _(n); a sector bitmap 306 comprising a bitmap for the Fsectors of the fragment, where F is the fragment size, and a set bitindicates a valid sector; and a cache device location 308 indicating anoffset in the cache device 114 ₁, 114 ₂ . . . 114 _(n) where thefragment data is stored.

FIG. 4 illustrates an embodiment of the header metadata 400 includingchunk metadata 204. The header metadata 400 includes a caching clientidentifier (ID) 402 identifying the caching client 102 that wrote theheader metadata 400; a permission grain size 404 indicating a permissiongrain size that the storage server 106 granted to the cache client 102for accessing data from the storage 104; a header metadata start 406indicating an offset in the cache device 114 ₁, 114 ₂ . . . 114 _(n) atwhich the header metadata 400 begins; a header metadata size 408comprising a size of the header metadata 400 in bytes; a sessionidentifier 410 indicating a session during which the header metadata 400was written; chunk start and end pointers 412 providing a pair of startand end pointers for each chunk 206 ₁ . . . 206 _(n) to which fragmentmetadata 208 ₁ . . . 208 _(n) is written; a chunk compressed indicator414 indicating whether the fragment metadata in the chunks 206 ₁ . . .206 _(n) is compressed; chunk padding 416 indicating for each chunk 206₁ . . . 206 _(n) the bytes added at the end of the chunk; headermetadata checksum 418 providing an error checking code calculated fromall the header metadata 418, which may include the chunk metadata; and achunk metadata checksum 420 comprising an error checking code calculatedfrom the chunks 206 ₁ . . . 206 _(n) storing the fragment metadata 208 ₁. . . 208 _(n).

In the embodiment of FIG. 4, the chunk metadata 204, such as fields 412,414, 416, and 420, is included in the header metadata 400, such that theheader metadata checksum 418 is calculated additionally from the chunkmetadata 204. In alternative embodiments, the chunk metadata 204 may bemaintained separate from the header metadata 400.

FIGS. 5a and 5b illustrate an embodiment of operations performed by thecache manager 118 to perform a graceful shutdown of the one or morecache devices 114 ₁, 114 ₂ . . . 114 _(n) in the cache client 102. Uponinitiating (at block 500) a graceful shutdown, the cache manager 118holds (at block 502) all the cache devices 114 ₁, 114 ₂ . . . 114 _(n)to prevent them from going into an offline state during the shutdownprocedure. All the logical devices, e.g., LUNs, subject to being cachedin the cache devices 114 ₁, 114 ₂ . . . 114 _(n), are also held (atblock 504) from going offline for the caching client 102. For each cachedevice i, comprising one of the cache devices 114 ₁, 114 ₂ . . . 114_(n), the cache manager 118 performs a loop (from blocks 506 through536) of the operations at blocks 508 through 534. For each fragment ofdata stored in the cache device i, the cache manager 118 generates (atblock 508) from the cache directory 116 the fragment metadata 208 ₁ . .. 208 _(n) including a logical device ID 302 of the logical device inthe storage 104 having the fragment data, a fragment identifier 304, asector bitmap 306 having a bit for each sector in the fragment dataindicating whether the corresponding sector is valid, and a cache devicelocation 308 indicating the location in the cache device i of thefragment data.

The cache manager 118 divides (at block 510) the generated fragmentmetadata 208 ₁ . . . 208 _(n) into corresponding chunks 206 ₁ . . . 206_(n) of storage in the cache device i to which the fragment metadata 208₁ . . . 208 _(n) is to be written. The fragment metadata 208 ₁ . . . 208_(n) may optionally be compressed (at block 512). The compressed (oruncompressed) fragment metadata 208 ₁ . . . 208 _(n) is written (atblock 514) to the at least one corresponding chunk 206 ₁ . . . 206 _(n)in the cache device i. For each of the at least one chunk 206 ₁ . . .206 _(n) in the cache device i to which the fragment metadata 208 ₁ . .. 208 _(n) is written, the cache manager 118 generates (at block 516)chunk metadata 204 for the chunk 206 ₁ . . . 206 _(n), including a chunklocation 412 of the chunk in the cache device i, and other chunkinformation, e.g., 414, 416. The cache manager 118 calculates (at block518) a chunk checksum 420 from each chunk 206 ₁ . . . 206 _(n) to whichfragment metadata is written. The chunk metadata 204 and the chunkchecksum 420 are written (at block 520) to the metadata directory 200 inthe cache device i. Control then proceeds to block 522 in FIG. 5 b.

At block 522, the cache manager 118 generates (at block 522) headermetadata 400 including a caching client ID 402, permission grain size404, header metadata start 406 and size 408, session ID 410, etc. Aheader metadata checksum 418 is generated (at block 524) from the headermetadata 400. The cache manager 118 writes (at block 526) the headermetadata 400 and header metadata checksum 418 to the metadata directory200 in the cache device i. The cache manager 118 then notifies (at block528) the storage server 106 that a graceful shutdown sequence wasinitiated. Upon receiving (at block 530) acknowledgment from the storageserver 106 of the graceful shutdown notification, the cache manager 118releases (at block 532) all the logical devices (LUNs) having datacached at the caching client 2 and marks (at block 534) all the metadatain the metadata directory 200 as valid.

In described embodiments, the metadata for the fragments is generatedand written during a shutdown operation. In alternative embodiments,certain of the metadata may be written during normal operations.

FIGS. 6a and 6b illustrate an embodiment of operations performed by thecache manager 118 to perform a warm start after the graceful shutdown ofFIGS. 5a and 5b . Upon initiating (at block 600) the restart operation,the cache manager 118 performs a loop (from blocks 602 through 634) ofthe operations at blocks 604 through 632 for each cache device i,comprising one of the cache devices 114 ₁, 114 ₂ . . . 1l4 _(n). Forcache device i, the cache manager 118 reads (at block 604) the header400, chunk 204, and fragment metadata 208 ₁ . . . 208 _(n) into the mainmemory 112. The cache manager 118 uses (at block 606) the header 418 andchunk 420 checksums to validate the header metadata 400 and chunks offragment metadata 208 ₁ . . . 208 _(n). If (at block 608) the header 400and chunks 206 ₁ . . . 206 _(n) validated, then the cache manager 118validates (at block 610) the session ID 410, which may involve checkingwhether the current session matches the session ID 410. If the headerand chunks did not validate (from the no branch of block 608) or thesession ID 410 did not validate (from the no branch of block 610), thenthe cached data 122, is invalidated and purged (at block 612).

Otherwise, if validation occurred (from the yes branches of blocks 608and 610), then the cache manager 118 constructs (at block 614) the cachedirectory 116 from the header 400, chunk 204, and fragment metadata 208₁ . . . 208 _(n). The header 400 and fragment metadata 208 ₁ . . . 208_(n) in the metadata directory 200 in the cache device i are invalidated(at block 616). The cache manager 118 sends (at block 618) to thestorage server 106 a permission request based on the permission grainsize 404 and the client caching device ID 402. Control proceeds to block620 in FIG. 6 b.

Upon receiving (at block 620) permission from the storage server 106,such as a caching lease, granted for a permission grain size cachingclient ID, the cache manager 118 determines (at block 622) whether thepermission grain size 404 and caching client ID 402 in the headermetadata 400 match those in the caching lease from the storage server106. If not, then the fragment data is purged (at block 624). If (atblock 622) the permission grain size 404 and caching client ID 402 matchthose in the caching lease, then the cache manager 118 requests (atblock 626) permissions form the storage server 106 for each cachedfragment data for which the fragment metadata 208 ₁ . . . 208 _(n) ismaintained to determine whether fragment data has been invalidated sincea shutdown prior to the restart operation. The storage server 106 maydetermine whether the fragment data for which permission is requestedhas been changed since the shutdown, which would mean that the cacheddata at the caching client 102 is invalid. Upon receiving (at block 628)the permissions for the fragment data, the cache manager 118 purges (atblock 630) fragments from the cache device i for which permissions arenot received, i.e., which are determined to be invalid. The cache devicei goes online (at block 632).

In certain embodiments, the cache manager 118 may only generate themetadata for fragments during a shutdown procedure to avoid having toconstantly update the metadata directory when the fragment data ischanged during normal operations. The header metadata 400 and fragmentmetadata 208 ₁ . . . 208 _(n) are used to verify the integrity of themetadata after a reboot operation to determine whether the previouslygenerated metadata during the shutdown can be used with the fragmentdata in the cache devices 114 ₁, 114 ₂ . . . 114 _(n). Further, themetadata directory 200 is read during restart operations, but notaccessed during normal caching operations.

With described embodiments, a single cache manager 118 may recovercached data from each of a plurality of cache devices 114 ₁, 114 ₂ . . .114 _(n) independently. Each cache device 114 ₁, 114 ₂ . . . 114 _(n)stores the metadata relevant to the cached data in its own metadatadirectory 200. Further, the non-volatile nature of the caching devicemedium (e.g., Flash memory) guarantees that the cached data will persistacross power cycles. The metadata directory 200 allows identification ofcached data in the caching devices 114 ₁, 114 ₂ . . . 114 _(n).

With described embodiments, each one of the caching clients 102 canreuse as much cached data as possible after a power cycle. Further, thenetwork traffic required for synchronization between the caching clients102 and the storage server 106 after a client power cycle is minimizedbecause only permissions for the caching license, e.g., grain size andcaching client 102, and permissions for the fragment data are requested.Yet further, the described caching scheme guarantees correctness in thepresence of a client crash or in the presence of other writers writingto the cached data a the caching client 102 is offline.

The described operations may be implemented as a method, apparatus orcomputer program product using standard programming and/or engineeringtechniques to produce software, firmware, hardware, or any combinationthereof. Accordingly, aspects of the embodiments may take the form of anentirely hardware embodiment, an entirely software embodiment (includingfirmware, resident software, micro-code, etc.) or an embodimentcombining software and hardware aspects that may all generally bereferred to herein as a “circuit,” “module” or “system.” Furthermore,aspects of the embodiments may take the form of a computer programproduct embodied in one or more computer readable medium(s) havingcomputer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described above with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The terms “an embodiment”, “embodiment”, “embodiments”, “theembodiment”, “the embodiments”, “one or more embodiments”, “someembodiments”, and “one embodiment” mean “one or more (but not all)embodiments of the present invention(s)” unless expressly specifiedotherwise.

The terms “including”, “comprising”, “having” and variations thereofmean “including but not limited to”, unless expressly specifiedotherwise.

The enumerated listing of items does not imply that any or all of theitems are mutually exclusive, unless expressly specified otherwise.

The terms “a”, “an” and “the” mean “one or more”, unless expresslyspecified otherwise.

Devices that are in communication with each other need not be incontinuous communication with each other, unless expressly specifiedotherwise. In addition, devices that are in communication with eachother may communicate directly or indirectly through one or moreintermediaries.

A description of an embodiment with several components in communicationwith each other does not imply that all such components are required. Onthe contrary a variety of optional components are described toillustrate the wide variety of possible embodiments of the presentinvention.

Further, although process steps, method steps, algorithms or the likemay be described in a sequential order, such processes, methods andalgorithms may be configured to work in alternate orders. In otherwords, any sequence or order of steps that may be described does notnecessarily indicate a requirement that the steps be performed in thatorder. The steps of processes described herein may be performed in anyorder practical. Further, some steps may be performed simultaneously.

When a single device or article is described herein, it will be readilyapparent that more than one device/article (whether or not theycooperate) may be used in place of a single device/article. Similarly,where more than one device or article is described herein (whether ornot they cooperate), it will be readily apparent that a singledevice/article may be used in place of the more than one device orarticle or a different number of devices/articles may be used instead ofthe shown number of devices or programs. The functionality and/or thefeatures of a device may be alternatively embodied by one or more otherdevices which are not explicitly described as having suchfunctionality/features. Thus, other embodiments of the present inventionneed not include the device itself.

The illustrated operations of the Figures show certain events occurringin a certain order. In alternative embodiments, certain operations maybe performed in a different order, modified or removed. Moreover, stepsmay be added to the above described logic and still conform to thedescribed embodiments. Further, operations described herein may occursequentially or certain operations may be processed in parallel. Yetfurther, operations may be performed by a single processing unit or bydistributed processing units.

The caching clients 102 and storage server 106 and components therein,may be implemented in one or more computer systems, such as the computersystem 702 shown in FIG. 7. If the components of the network computingenvironment of FIG. 1 are implemented in multiple systems, then thesystems may communicate over the network 108. Computer system/server 702may be described in the general context of computer system executableinstructions, such as program modules, being executed by a computersystem. Generally, program modules may include routines, programs,objects, components, logic, data structures, and so on that performparticular resources or implement particular abstract data types.Computer system/server 702 may be practiced in distributed cloudcomputing environments where resources are performed by remoteprocessing devices that are linked through a communications network. Ina distributed cloud computing environment, program modules may belocated in both local and remote computer system storage media includingmemory storage devices.

As shown in FIG. 7, the computer system/server 702 is shown in the formof a general-purpose computing device. The components of computersystem/server 702 may include, but are not limited to, one or moreprocessors or processing units 704, a system memory 706, and a bus 708that couples various system components including system memory 706 toprocessor 704. Bus 708 represents one or more of any of several types ofbus structures, including a memory bus or memory controller, aperipheral bus, an accelerated graphics port, and a processor or localbus using any of a variety of bus architectures. By way of example, andnot limitation, such architectures include Industry StandardArchitecture (ISA) bus, Micro Channel Architecture (MCA) bus, EnhancedISA (EISA) bus, Video Electronics Standards Association (VESA) localbus, and Peripheral Component Interconnects (PCI) bus.

Computer system/server 702 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 702, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 706 can include computer system readable media in the formof volatile memory, such as random access memory (RAM) 710 and/or cachememory 712. Computer system/server 702 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 713 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 708 by one or more datamedia interfaces. As will be further depicted and described below,memory 706 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 714, having a set (at least one) of program modules 716,may be stored in memory 706 by way of example, and not limitation, aswell as an operating system, one or more application programs, otherprogram modules, and program data. Each of the operating system, one ormore application programs, other program modules, and program data orsome combination thereof, may include an implementation of a networkingenvironment. The components of the computer 2 may be implemented asprogram modules 716 which generally carry out the functions and/ormethodologies of embodiments of the invention as described herein.

Computer system/server 702 may also communicate with one or moreexternal devices 718 such as a keyboard, a pointing device, a display720, etc.; one or more devices that enable a user to interact withcomputer system/server 12; and/or any devices (e.g., network card,modem, etc.) that enable computer system/server 702 to communicate withone or more other computing devices. Such communication can occur viaInput/output (I/O) interfaces 722. Still yet, computer system/server 702can communicate with one or more networks such as a local area network(LAN), a general wide area network (WAN), and/or a public network (e.g.,the Internet) via network adapter 724. As depicted, network adapter 724communicates with the other components of computer system/server 702 viabus 708. It should be understood that although not shown, other hardwareand/or software components could be used in conjunction with computersystem/server 702. Examples, include, but are not limited to: microcode,device drivers, redundant processing units, external disk drive arrays,RAID systems, tape drives, and data archival storage systems, etc.

The foregoing description of various embodiments of the invention hasbeen presented for the purposes of illustration and description. It isnot intended to be exhaustive or to limit the invention to the preciseform disclosed. Many modifications and variations are possible in lightof the above teaching. It is intended that the scope of the invention belimited not by this detailed description, but rather by the claimsappended hereto. The above specification, examples and data provide acomplete description of the manufacture and use of the composition ofthe invention. Since many embodiments of the invention can be madewithout departing from the spirit and scope of the invention, theinvention resides in the claims herein after appended.

1. A computer program product for caching data from a storage devicemanaged by a storage server in a cache device providing non-volatilestorage, the computer program product comprising a computer readablestorage medium having computer readable program code embodied thereinthat is executable to perform operations, the operations comprising: foreach of at least one chunk in the cache device having fragment metadatafor each fragment of data from the storage server stored in the cachedevice, generating chunk metadata for the chunk; using the chunkmetadata to validate the fragment metadata in the cache device during arestart operation.
 2. The computer program product of claim 1, whereinthe operations performed as part of the restart operation furthercomprise: using the chunk metadata to validate header metadata;constructing a cache directory from information in response tovalidating the header metadata and the fragment metadata; indicating theheader metadata as invalid; and requesting permission from the storageserver to access the cached fragment data.
 3. The computer programproduct of claim 1, wherein the operations performed as part of therestart operation further comprise: constructing a cache directory fromthe fragment metadata; indicating the fragment metadata as invalid;requesting permission from the storage server to use the fragment datastored in the cache device; and using the cached fragment data for whichpermission is granted.
 4. (canceled)
 5. The computer program product ofclaim 1, wherein the fragment metadata includes a logical device in thestorage device of the fragment data, a sector bitmap having a bit foreach sector in the fragment data indicating whether the correspondingsector is valid, and a cache device location indicating the location inthe cache device of the fragment data.
 6. The computer program productof claim 1, wherein the chunk metadata includes for each of the at leastone chunk to which the fragment metadata is written a chunk locationindicating the location of the chunk having the fragment metadata in thecache device, and a chunk checksum of the fragment metadata written tothe chunk, wherein further performing during the restart operation:validating each chunk of fragment metadata in the cache device using thechunk checksum, wherein the metadata in the metadata directory and thefragment data in the cache device are not validated if the chunk offragment metadata is not validated using the chunk checksum.
 7. Thecomputer program product of claim 1, wherein header metadata includes apermission grain size and caching client identifier, wherein theoperations during the restart operation further comprise: sending to thestorage server a permission request based on the permission grain sizeand the caching client identifier, wherein the fragment data in thecache device is not reused after the restart operation if the storageserver does not grant permission in response to the permission request.8. The computer program product of claim 7, wherein the header metadataincludes a header checksum, wherein further performing during therestart operation: validating the header metadata in the metadatadirectory in the cache device using the header checksum, wherein thefragment data in the cache device is not reused after the restartoperation if the header metadata is not validated using the headerchecksum.
 9. The computer program product of claim 1, wherein thefragment data from the storage device managed by the storage server iscached in a plurality of cache devices, wherein the operations ofgenerating the fragment metadata, writing the fragment metadata,creating and writing the chunk metadata, writing the header metadata,and using the written header metadata, chunk metadata, and fragmentmetadata during the restart operations are performed for each of theplurality of cache devices.
 10. The computer program product of claim 1,wherein the operations further comprise: initiating a shutdownoperation, wherein the generating the the chunk metadata is performed inresponse to initiating the shutdown operation, wherein the restartoperation follows the shutdown operation.
 11. A system for caching datafrom a storage device managed by a storage server, comprising: a cachedevice providing non-volatile storage; a processor; and a computerreadable storage medium having program code executed by the processor toperform operations, the operations comprising: for each of at least onechunk in the cache device to which the having fragment metadata for eachfragment of data from the storage server stored in the cache device,generating chunk metadata for the chunk; using the chunk metadata tovalidate the fragment metadata in the cache device during a restartoperation.
 12. The system of claim 11, wherein the operations performedas part of the restart operation further comprise: using the chunkmetadata to validate header metadata; constructing a cache directoryfrom information in response to validating the header metadata and thefragment metadata; indicating the header metadata as invalid; andrequesting permission from the storage server to access the cachedfragment data.
 13. The system of claim 11, wherein the operationsperformed as part of the restart operation further comprise:constructing a cache directory from the fragment metadata; indicatingthe fragment metadata as invalid; requesting permission from the storageserver to use the fragment data stored in the cache device; and usingthe cached fragment data for which permission is granted.
 14. (canceled)15. The system of claim 11, wherein header metadata includes apermission grain size and caching client identifier, wherein theoperations during the restart operation further comprise: sending to thestorage server a permission request based on the permission grain sizeand the caching client identifier, wherein the fragment data in thecache device is not reused after the restart operation if the storageserver does not grant permission in response to the permission request.16. The system of claim 11, wherein the fragment data from the storagedevice managed by the storage server is cached in a plurality of cachedevices, wherein the operations of generating the fragment metadata,writing the fragment metadata, creating and writing the chunk metadata,writing the header metadata, and using the written header metadata,chunk metadata, and fragment metadata during the restart operations areperformed for each of the plurality of cache devices.
 17. The system ofclaim 11, wherein the operations further comprise: initiating a shutdownoperation, wherein the generating the chunk metadata is performed inresponse to initiating the shutdown operation, wherein the restartoperation follows the shutdown operation.
 18. A method for caching datafrom a storage device managed by a storage server in a cache deviceproviding non-volatile storage, comprising: for each of at least onechunk in the cache device having fragment metadata for each fragment ofdata from the storage server stored in the cache device, generatingchunk metadata for the chunk; and using the chunk metadata to validatethe fragment metadata in the cache device during a restart operation.19. The method of claim 18, wherein the operations performed as part ofthe restart operation further comprise: using the chunk metadata tovalidate header metadata; constructing a cache directory frominformation in response to validating the header metadata and thefragment metadata; indicating the header metadata as invalid; andrequesting permission from the storage server to access the cachedfragment data.
 20. The method of claim 18, wherein the operationsperformed as part of the restart operation further comprise:constructing a cache directory from the fragment metadata; indicatingthe fragment metadata as invalid; requesting permission from the storageserver to use the fragment data stored in the cache device; and usingthe cached fragment data for which permission is granted.
 21. The methodof claim 18, wherein the chunk metadata includes for each of the atleast one chunk to which the fragment metadata is written a chunklocation indicating the location of the chunk having the fragmentmetadata in the cache device, and a chunk checksum of the fragmentmetadata written to the chunk, wherein further performing during therestart operation: validating each chunk of fragment metadata in thecache device using the chunk checksum, wherein the metadata in themetadata directory and the fragment data in the cache device are notvalidated if the chunk of fragment metadata is not validated using thechunk checksum.
 22. The method of claim 18, wherein header metadataincludes a permission grain size and caching client identifier, whereinthe operations during the restart operation further comprise: sending tothe storage server a permission request based on the permission grainsize and the caching client identifier, wherein the fragment data in thecache device is not reused after the restart operation if the storageserver does not grant permission in response to the permission request.23. The method of claim 18, wherein the fragment data from the storagedevice managed by the storage server is cached in a plurality of cachedevices, wherein the operations of generating the fragment metadata,writing the fragment metadata, creating and writing the chunk metadata,writing the header metadata, and using the written header metadata,chunk metadata, and fragment metadata during the restart operations areperformed for each of the plurality of cache devices.
 24. (canceled)